#!/usr/bin/ruby

model_url = "http://dl.dropbox.com/u/2701879/bgod"
#objreader = "svn checkout http://objreader.googlecode.com/svn/trunk/ objreader"

#puts "Getting objreader..."
#puts "Sorry windows, checkout with TortoiseSVN" unless system objreader

Dir.mkdir 'models'
Dir.chdir 'models'

puts "Getting file list..."
system "wget #{model_url}/list.txt -q"

list = IO.read('list.txt').split(/\n+/)

for model in list do
  puts "Getting #{model}..."
  system "wget #{model_url}/#{model}.obj -q"
  system "wget #{model_url}/#{model}.mtl -q"
end

